<me:UIWTZ x:Class="WPFExcelReport.TWTEINZ"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"     
                    xmlns:me="clr-namespace:WPFExcelReport" 
                    xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL" 
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls" 
                    xmlns:SD="clr-namespace:WPFExcelReport;assembly=TSDDAT" 
                      xmlns:Localization="clr-namespace:Localization;assembly=Localization"
                    xmlns:TXT="clr-namespace:WPFExcelReport;assembly=TTXTIND"  
                    x:Name="TV"
                    Loaded="Window_Loaded"
     >
    <me:UIWTZ.Resources>
        <CollectionViewSource  x:Key="vwMaster"/>       <CollectionViewSource  x:Key="vwDetail"/>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:NOTConverter  x:Key="not"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:NOTBoolToVisibilityConverter x:Key="nbv"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
    </me:UIWTZ.Resources>
    <Grid  >
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition> 
            <RowDefinition Height="1*"></RowDefinition>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions> 
            <ColumnDefinition Width="1*"/>
            <ColumnDefinition Width="1*"/>
        </Grid.ColumnDefinitions>
       
         <WrapPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" >
                <TextBlock Text="{Binding Source={Localization:Translate Word=穿综}}"/>
                <SD:K0109 
               LMS="D"
                IsEdit="True"
                KEY="{Binding BIND,ElementName=TV}"
                ORDERNUM="{Binding BIND,ElementName=TV}"/>
                <TextBlock Text="{Binding Source={Localization:Translate Word=纹板}}"/>
                <SD:K0109 
                LMS="P"
                IsEdit="True"
                KEY="{Binding PEGPLAN,ElementName=TV}"
                ORDERNUM="{Binding PEGPLAN,ElementName=TV}"/>
                <TextBlock Text="{Binding Source={Localization:Translate Word=组织图}}"/>
                <SD:K0109 
                LMS="W"
                IsEdit="True"
                KEY="{Binding WEAVE,ElementName=TV}"
                ORDERNUM="{Binding WEAVE,ElementName=TV}"/>
            </WrapPanel> 
        <Grid Grid.Row="1"  Grid.Column="0" Grid.ColumnSpan="2">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="1*"/>
                <RowDefinition Height="100"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="1*"/>
            </Grid.ColumnDefinitions>
            <WrapPanel Grid.Row="0" Grid.Column="0">
                <Grid Margin="10,0,0,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <Button  Click="EditCommand" Width="24" Height="20"
                             IsEnabled="{Binding IsCanChg,ElementName=TV}"
                             >
                        <Button.Background>
                            <ImageBrush  ImageSource="/ImagePackage;component/Images/Edit.png" />
                        </Button.Background>
                    </Button>
                </Grid>
                <Grid Margin="10,0,0,0" >
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <Button Click="SaveCommand" Height="20" Margin="5,0,0,0" Width="24"
                            IsEnabled="{Binding IsCanDelete,ElementName=TV}"
                            >
                        <Button.Background>
                            <ImageBrush  ImageSource="/ImagePackage;component/Images/Save.png" />
                        </Button.Background>
                    </Button>
                </Grid>
            </WrapPanel>
            <me:TWTDF Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="5" x:Name="cDF"
                      IsCanLoad="True"
                        IsEdit="{Binding IsEdit,ElementName=TV}"
                        IsSaved="{Binding IsSaved,ElementName=TV}"
                       DFS="{Binding DFS,ElementName=TV}"
                       ORDERNUM="{Binding BIND,ElementName=TV}"
                      />
            <me:TWTPEG Grid.Row="4" Grid.Column="0" x:Name="cPG"
                        IsCanLoad="True"
                       DFS="{Binding DFS,ElementName=TV}"
                        IsEdit="{Binding IsEdit,ElementName=TV}"
                        IsSaved="{Binding IsSaved,ElementName=TV}"
                        ORDERNUM="{Binding PEGPLAN,ElementName=TV}"
                       
                       />
            <me:TWTWV Grid.Row="4" Grid.Column="4" x:Name="cWV"
                       IsCanLoad="True"
                      DFS="{Binding DFS,ElementName=TV}"
                       IsEdit="{Binding IsEdit,ElementName=TV}"
                        IsSaved="{Binding IsSaved,ElementName=TV}"
                       ORDERNUM="{Binding WEAVE,ElementName=TV}"
                      TBDF="{Binding TBDF,ElementName=cDF}"
                      TBPG="{Binding TBPG,ElementName=cPG}"
                       DFPS="{Binding DFPS,ElementName=cDF}"
                      PGPS="{Binding PGPS,ElementName=cPG}"
                      />
        </Grid>
    </Grid> 
</me:UIWTZ>

    
